{-
	Copyright (c) 2009 Aitor Lopez Fadrique <mailto:aitorlf@gmail.com>
	All rights reserved
	Licensed under GNU LGPL v2.1

	$Id: SpanishClassicDeck.hs 15 2009-09-28 21:16:23Z aitorlf $

	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License version 2.1 (and just under that one) as published by
	the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but without any warranty; without even the implied warranty of
	merchantability or fitness for a particular purpose. See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this program; if not, write to the Free
	Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
	MA 02111-1307, USA.
-}

{-|
	Module		: Games.Cards.Deck.SpanishClassicDeck
	Copyright	: (c) Aitor Lopez Fadrique <mailto:aitorlf@gmail.com>
	License		: GNU LGPL v2.1 <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>

	Maintainer	: Aitor Lopez Fadrique <mailto:aitorlf@gmail.com>
	Stability	: provisional
	Portability	: portable

	Definition of the Spanish classic (40 cards) deck according to Games.Cards.Deck.

	This module defines the basic Spanish 40 cards classic deck.
-}
module Games.Cards.Deck.SpanishClassicDeck(
		-- * Spanish 40 cards classic deck
		-- ** Types defining cards and decks for the Spanish classic deck
		SpanishClassicRank(..),
		SpanishRank,
		SpanishSuit(..),
		SpanishClassicCard,
		SpanishCard,
		SpanishClassicDeck,
		SpanishDeck,
		-- ** Instances of Spanish classic decks
		spanishClassicDeck,
		spanishDeck,
	)where

import Games.Cards.Deck


-- | Well-known ranks for the classic Spanish deck.
data SpanishClassicRank =
		-- | 'Dos' (/Two 2/)
		Dos
		-- | 'Tres' (/Three 3/)
		| Tres
		-- | 'Cuatro' (/Four 4/)
		| Cuatro
		-- | 'Cinco' (/Five 5/)
		| Cinco
		-- | 'Seis' (/Six 6/)
		| Seis
		-- | 'Siete' (/Seven 7/)
		| Siete
		-- | 'Sota' (/Knave 10/)
		| Sota
		-- | 'Caballo' (/Cavalier 11/)
		| Caballo
		-- | 'Rey' (/King 12/)
		| Rey
		-- | 'As' (/Ace 1/)
		| As
	deriving (Eq, Ord, Enum, Bounded, Show, Read)
instance CardRank SpanishClassicRank
-- | Alias @'SpanishClassicRank'@ as @'SpanishRank'@.
type SpanishRank = SpanishClassicRank


-- | Well-known suits for the Spanish deck.
data SpanishSuit =
		-- | 'Oros' (/Coins/)
		Oros
		-- | 'Copas' (/Cups/)
		| Copas
		-- | 'Espadas' (/Swords/)
		| Espadas
		-- | 'Bastos' (/Batons/)
		| Bastos
	deriving (Eq, Enum, Bounded, Show, Read)
instance CardSuit SpanishSuit


-- | Definition of the 40 cards classic Spanish @'Card'@s and @'Deck'@s.

-- | Spanish classic card type.
type SpanishClassicCard = Card SpanishClassicRank SpanishSuit WildCardNone
-- | Alias @'SpanishClassicCard'@ as @'SpanishCard'@.
type SpanishCard = SpanishClassicCard

-- | Spanish classic deck type.
type SpanishClassicDeck = Deck SpanishClassicRank SpanishSuit WildCardNone
-- | Alias @'SpanishClassicDeck'@ as @'SpanishDeck'@.
type SpanishDeck = SpanishClassicDeck

-- | Spanish classic deck instance.
spanishClassicDeck :: SpanishClassicDeck
spanishClassicDeck = deck

-- | Spanish deck instance.
spanishDeck :: SpanishClassicDeck
spanishDeck = spanishClassicDeck
